/**
 * @version 1.8
 * @Author Djx_hmbb
 * @Date 2023/8/8 18:03
 * @注释:写法和2本质相同.只不过将创建runnable任务交给了匿名内部类
 * 使用匿名内部类实现Runnable
 */
public class ThreadDemo4 {
    public static void main(String[] args) {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("hello runnable");
            }
        });
        t.start();
    }
}
